<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/dic" prefix="dic"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
</head>
<body>
	<center>
		<h1>--------本页面为index.jsp页面--------</h1>
		<h3>-------单个获取字段------</h3>
		${dic:getDicV("color","1")}
		<h3>-------单个获取字段如果不存在显示------</h3>
		${dic:getDicVAndD("color","5", "无字典")} 
		
		<h3>-------单个select Sex测试  有过滤------</h3>
		<select id="gg"> 
			${dic:getDicOption("sex", true, "1")}
		</select>
		<h3>-------单个select Sex测试  无过滤 全部显示  默认选中显示最后一项太监------</h3>
		<select id="ggwu"> ${dic:getDicOption("sex", false, "2")}
		</select>
		<h3>-------级联测试 只有中国 和 河北有数据------</h3>
		<select id="jsCity">
			<option value="">请选择1</option>
		</select> <select id="jsCity2">
			<option value="">请选择2</option>
		</select> <select id="jsCity3">
			<option value="">请选择3</option>
		</select>
	</center>
</body>
<script language="javascript" src="<%=request.getContextPath()%>/js/jquery-1.7.2.min.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/js/dictionary.js"></script>
<script type="text/javascript">
	//DIC.loadTypes(["color", "sex"]);//可以统一加载这个两个字段
	//	alert(DIC.getDicStringByKey("sex", "2", "无")+ "--" + DIC.getDicList("color").length);
	var jsSel = [ {
		$select : $("#jsCity")
	}, {
		$select : $("#jsCity2")
	}, {
		$select : $("#jsCity3")
	} ];
	DIC.setSelect("city", jsSel);
</script>
</html>
